package com.joy.model;

import lombok.*;

import java.sql.Timestamp;
import java.util.Date;

@Setter
@Getter
public class CourseStudent {
    private Long id; // 关联表自增主键
    private Long courseId; // 课程id，与课程表中的course_id关联
    private Long studentId; // 学生id，与学生表中的student_id关联
    private Date enrollTime; // 报名时间
    private Timestamp createTime; // 创建时间
    private Timestamp modifyTime; // 最后修改时间

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Date getEnrollTime() {
        return enrollTime;
    }

    public void setEnrollTime(Date enrollTime) {
        this.enrollTime = enrollTime;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public String toString() {
        return "CourseStudent{" +
                "id=" + id +
                ", courseId=" + courseId +
                ", studentId=" + studentId +
                ", enrollTime=" + enrollTime +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                '}';
    }

    public CourseStudent(Long id, Long courseId, Long studentId, Date enrollTime, Timestamp createTime, Timestamp modifyTime) {
        this.id = id;
        this.courseId = courseId;
        this.studentId = studentId;
        this.enrollTime = enrollTime;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
    }
}